package com.xio.ribbon;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: xio
 * @Description: ribbon配置类
 * @Date: 2020/9/28 11:36
 */
@Configuration
public class RibbonConfig {

    @Bean
    // 负载均衡 随机策略
    public IRule randomRule(){
        return new RandomRule();
    }
}
